package com.black.opsadmin.service.impl;

import com.black.opsadmin.dao.PermissionDao;
import com.black.opsadmin.service.PermissionService;
import com.black.opscommon.entity.Permission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Set;

/**
 * @author qiang.zhang
 * @date 2018-11-23
 */
@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionDao permissionDao;


    @Override
    public Set<Permission> findByRoles_Id(Long id) {
        return permissionDao.findByRoles_Id(id);
    }

}
